package com.alex;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");

        Book book1 = ctx.getBean("book1", Book.class);
        System.out.println(book1);

        Book book2 = ctx.getBean("book2", Book.class);
        System.out.println(book2);

        Book book3 = ctx.getBean("book3", Book.class);
        System.out.println(book3);

        System.out.println(ctx.getBean("book4"));
        System.out.println(ctx.getBean("book5"));
    }
}
